<template>
    <div class="assignment-header">
        <button class="back-button" @click="$router.push('/student/feedback/card')">← 返回</button>
        <button type="success" class="assign_button" @click="assignHome">提交反馈</button>
    </div>
    <div class="satisfaction-survey">
        <div class="improvement-suggestions">
            <div class="serial">
                <div class="serial1">1</div>
                <div class="serial2">改进建议</div>
            </div>
            <input v-model="inputData" placeholder="请详细描述您对课程的建议和想法..." class="suggestion_input" />
        </div>
        <div class="satisfaction-chart">
            <div class="serial">
                <div class="serial1">2</div>
                <div class="serial2">满意度 (100满意-0不满意)</div>
            </div>
            <el-radio-group v-model="radio" class="select_form">
                <el-radio :value="1">95-100很满意</el-radio>
                <el-radio :value="2">90-95满意</el-radio>
                <el-radio :value="3">80-90较满意</el-radio>
                <el-radio :value="4">60-80一般</el-radio>
                <el-radio :value="5">30-60不满意</el-radio>
                <el-radio :value="6">0-30很不满意</el-radio>
            </el-radio-group>
        </div>
        <div class="satisfaction-chart">
            <div class="serial">
                <div class="serial1">3</div>
                <div class="serial2">课程内容理解程度（100%完全理解-0%完全不理解）</div>
            </div>
            <el-radio-group v-model="radio" class="select_form">
                <el-radio :value="7">80-100完全理解</el-radio>
                <el-radio :value="8">70-85大部分理解</el-radio>
                <el-radio :value="9">60-70基本理解</el-radio>
                <el-radio :value="10">30-60部分理解</el-radio>
                <el-radio :value="11">0-30很不理解</el-radio>
            </el-radio-group>
        </div>
    </div>
</template>

<script setup>
import { ref, computed } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter();
const inputData = ref('');

const radio = ref();
const assignHome = () => {
  ElMessage.success('提交成功');
  router.push('/student/feedback/card');
};
</script>


<style scoped>
.assignment-header {
    display: flex;
    height: 8lvh;
    width: 98lvw;
    background-color: #13227A;
    color: white;
}

.back-button {
    background-color: transparent;
    margin-left: 1%;
    margin-top: 0.5lvh;
    width: 5%;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
}

.back-button:hover {
    color: #d72d2d;
}

.assign_button {
  position: absolute;
  margin-top: 0.8%;
  margin-left: 87%;
  height: 5%;
  width: 10%;
  background-color: #1a3a8b;
  color: white;
  border: 1px solid #ffffff;
  cursor: pointer;
  border-radius: 5px;
}

.assign_button:hover {
  background-color: #98a2bb;
}

.satisfaction-survey {
    padding: 20px;
    background-color: #ffffff;
}

.improvement-suggestions {
    margin-top: 1lvh;
    margin-bottom: 20px;
}

.satisfaction-chart {
    margin-top: 20px;
    margin-top: 5lvh;
}


.select_form {
    align-items: flex-start;
    margin-left: 1lvw;
    margin-top: 1lvh;
    width: 92lvw;
    display: flex;
    flex-direction: column;
}

.serial {
    display: flex;
    width: 100%;
    height: 4lvh;
}

.serial1 {
    float: left;
    color: white;
    margin-left: 3px;
    background-color: #13227A;
    width: 20px;
    height: 20px;
    text-align: center;
    border-radius: 50%;
}

.serial2 {
    margin-left: 5px;
    font-size: 17px;
    font-weight: 700;
}

.suggestion_input {
    width: 92lvw;
    height: 4lvh;
    margin-left: 1lvw;
    margin-top: 1lvh;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
    resize: vertical;
}
</style>